/*    */ package server.console.groups.setting;
/*    */ 
/*    */ import com.alee.extended.panel.GroupPanel;
/*    */ import com.alee.laf.panel.WebPanel;
/*    */ import com.alee.laf.scroll.WebScrollPane;
/*    */ import constants.ServerConstants;
/*    */ import java.awt.Component;
/*    */ 
/*    */ 
/*    */ public class ServerConfigGroup
/*    */   extends AbstractConfigGroup
/*    */ {
/*    */   public ServerConfigGroup(ConfigPanel owner) {
/* 14 */     super(owner, "服务端配置");
/*    */   }
/*    */ 
/*    */ 
/*    */   
/*    */   public Component getPreview() {
/* 20 */     AbstractConfigGroup.TitleWebPanel titleWebPanel1 = new AbstractConfigGroup.TitleWebPanel( "基本设置");
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */     
/* 26 */     WebPanel groupPanel = (new GroupPanel(false, new Component[] { (Component)new AbstractConfigGroup.ConfigComponent( "游戏名称", "login.server.name"), (Component)new AbstractConfigGroup.ConfigComponent( "频道数量", ConfigGroup.ComponentType.下拉菜单, "channel.server.ports", "1,2,3,4,5,6,7,8,9,10"), (Component)new AbstractConfigGroup.ConfigComponent( "游戏服务器名称", ConfigGroup.ComponentType.下拉菜单, "login.server.flag", getAllServerName()), (Component)new AbstractConfigGroup.ConfigComponent( "游戏服务器状态", ConfigGroup.ComponentType.下拉菜单, "login.server.status", getAllServerStatus()) })).setMargin(5);
/*    */ 
/*    */ 
/*    */     
/* 30 */     titleWebPanel1.add((Component)groupPanel);
/*    */     
/* 32 */     AbstractConfigGroup.TitleWebPanel titleWebPanel2 = new AbstractConfigGroup.TitleWebPanel( "数据库连接设置");
/* 33 */     titleWebPanel2.add((Component)(new GroupPanel(false, new Component[] { (Component)new AbstractConfigGroup.ConfigComponent( "IP", "db.ip"), (Component)new AbstractConfigGroup.ConfigComponent( "端口", "db.port"), (Component)new AbstractConfigGroup.ConfigComponent( "数据库名称", "db.name"), (Component)new AbstractConfigGroup.ConfigComponent( "账号", "db.user"), (Component)new AbstractConfigGroup.ConfigComponent( "密码", "db.password")
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */           
/* 64 */           })).setMargin(5));
/*    */     
/* 66 */     AbstractConfigGroup.TitleWebPanel titleWebPanel3 = new AbstractConfigGroup.TitleWebPanel( "其他设置");
/* 67 */     titleWebPanel3.add((Component)(new GroupPanel(false, new Component[] { (Component)new AbstractConfigGroup.ConfigComponent( "脚本路径", "world.server.scriptspath")
/*    */           
/* 69 */           })).setMargin(5));
/*    */     
/* 71 */     WebScrollPane webScrollPane = new WebScrollPane((Component)new GroupPanel(5, false, new Component[] { (Component)titleWebPanel1, (Component)titleWebPanel2, (Component)titleWebPanel3 }), false);
/* 72 */     webScrollPane.createHorizontalScrollBar();
/* 73 */     webScrollPane.getViewport().setOpaque(false);
/* 74 */     return (Component)webScrollPane;
/*    */   }
/*    */   
/*    */   private String getAllServerName() {
/* 78 */     StringBuilder sb = new StringBuilder();
/* 79 */     for (ServerConstants.MapleServerName serverName : ServerConstants.MapleServerName.values()) {
/* 80 */       sb.append(serverName.name()).append(",");
/*    */     }
/* 82 */     return sb.toString();
/*    */   }
/*    */   
/*    */   private String getAllServerStatus() {
/* 86 */     StringBuilder sb = new StringBuilder();
/* 87 */     for (ServerConstants.MapleServerStatus status : ServerConstants.MapleServerStatus.values()) {
/* 88 */       sb.append(status.name()).append(",");
/*    */     }
/* 90 */     return sb.toString();
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\server\console\groups\setting\ServerConfigGroup.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */